import { ApiProperty } from "@nestjs/swagger";
import { instanceToPlain } from "class-transformer";
import { CreateDateColumn, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm";

export abstract class CommonEntity {
    @ApiProperty({ description: "数据库id" })
    @PrimaryGeneratedColumn()
    id: number;

    @ApiProperty({ type: "string", description: "创建时间" })
    @CreateDateColumn()
    createTime: Date;

    @ApiProperty({ type: "string", description: "创建时间" })
    @UpdateDateColumn()
    updateTime: Date;
}
